package ribbonconfiguration;

import com.cxy.contentcenter.configuration.NacosSameClusterWeightedRule;
import com.cxy.contentcenter.configuration.NacosWeightedRule;
import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author: huayushu luming
 * @date: 2020-11-27 06:30
 * @desc:
 **/
@Configuration
public class RibbonConfiguration {
    @Bean
    public IRule ribbonRule(){
       // return new NacosWeightedRule();
        return new NacosSameClusterWeightedRule();
    }
}
